import random

from base_model.nlp.base_model.first_model_mla import forward


orign_data = []

trans_map = {
    "0": "零",
    "1": "一",
    "2": "二",
    "3": "三",
    "4": "四",
    "5": "五",
    "6": "六",
    "7": "七",
    "8": "八",
    "9": "九"
}
# trans_map = {
#     "0": "0",
#     "1": "1",
#     "2": "2",
#     "3": "3",
#     "4": "4",
#     "5": "5",
#     "6": "6",
#     "7": "7",
#     "8": "8",
#     "9": "9"
# }


for i in range(10):
    current_string = ""
    out_string = ""
    num_length = random.randint(1, 9)
    for j in range(num_length):
        num = random.randint(0, 9)
        current_string += str(num)
        out_string += trans_map[str(num)]
    orign_data_item = {"input": current_string, "output": out_string}
    orign_data.append(orign_data_item)

for orign_datum in orign_data:
    forward(orign_datum["input"])
    print(f"right: {orign_datum['output']}")
    print()